<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCdnDomainsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cdn_domains', function (Blueprint $table) {
            $table->increments('id');
            $table->string('domain')->index()->default('');
            $table->tinyInteger('type')->index()->default('0')->comment('1图片，2视频，0通用');
            $table->tinyInteger('state')->index()->default('1')->comment('1启用，0停用,-1封禁');
            $table->string('server')->nullable()->comment('cdn服务商');
            $table->string('mark')->nullable()->default('');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cdn_domains');
    }
}
